package com.javasm.controller.goods;


import com.javasm.common.http.AxiosResult;
import com.javasm.controller.base.BaseController;
import com.javasm.domin.entity.goods.Color;
import com.javasm.domin.entity.goods.Product;
import com.javasm.service.goods.IColorService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author whl
 * @since 2022-01-16
 */
@RestController
@RequestMapping("color")
@RequiredArgsConstructor
public class ColorController extends BaseController {

    private final IColorService iColorService;

    @GetMapping("findColor")
    public AxiosResult<List<Color>> findColor() {

        List<Color> list = iColorService.list();
        return AxiosResult.success(list);
    }
}
